import Taro from "@tarojs/taro";

export async function toConvert(isOpen) {
  if (Object.is(isOpen, false)) {
    Taro.showToast({
      title: "暂未开放，敬请期待~",
      icon: "none"
    });
    return;
  }
  return await Taro.navigateTo({
    url: `/pages/convert/index`
  });
}

export async function toUserSetting() {
  return Taro.navigateTo({
    url: "/pages/user-setting/index"
  });
}

export async function toConvertList(type: string) {
  return Taro.navigateTo({
    url: "/pages/convert-list/convert-list?type=" + type
  });
}

export async function toSearchConvert() {
  return Taro.navigateTo({
    url: "/pages/search-convert/search-convert"
  });
}
